Skip to content

kboot_audio: pass amp-tx-zd-config on only where the card's idle masks agree - #291

Open
scottjones wants to merge 3 commits into
aurora-silicon:mainfrom
scottjones:upstream/t8122-amp-tx-zd
Open

scottjones wants to merge 3 commits into
aurora-silicon:mainfrom
scottjones:upstream/t8122-amp-tx-zd

Conversation

@scottjones

@scottjones scottjones commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

On the 13" M3 Air (J613) the speakers stay silent and the speaker daemon stops with "Left Tweeter: Negative power, bad ivsense data?".

The cause is the amp-tx-zd-config row aura passes on. On T8122 each amp's row is the complement of the sound card's idle masks: the J613 rows are f0 f0 f0 ff (left woofer) and 0f 0f 0f ff (right woofer), while the card masks are 0x0f0f and 0xf0f0. The SN012776 driver programs the row as the SDOUT slots to force to zero, so the right woofer zeroes slots 0-3 and 8-11, which carry the left woofer's and left tweeter's IV sense.

What: aura compares each amp's amp-tx-zd-config row with the sound card's TDM idle mask for that amp (dai-tdm-slot-tx-idle-mask-<n> in idle mode "zero", on the dai-link that lists the amp n-th). If any amp's row contradicts its mask, or two dai-links give an amp different masks, no amp of that group gets its row. That includes amps without a mask, such as the tweeters, whose complement-shaped rows would otherwise zero the woofers' sense slots. The card's masks then apply to the whole group, as before the rows were passed on. Groups whose masks agree keep every row, as on main. The rule depends only on the data, with no SoC or board check. aura logs every refusal.

 kboot_audio: for each amp group
   copy bop, dcblocker, speaker config
-  copy amp-tx-zd-config
+  copy amp-tx-zd-config, unless the card's idle masks contradict any row of the group

Tested:

  • J613, 7.3 kernel, before: SDOUT slots zeroed, speaker daemon exits, no sound. After, with the property dropped: SDOUT_HIZ as on 7.2, speaker daemon running, speakers audible.
  • tests/run-kboot-audio.sh: 49/49 scenarios pass, including the J613 four-amp layout and a codec@0 card. The T8122 cases fail on main.
  • J615 silent row at the current head (aura log, DT properties, SDOUT_HIZ readback, speakerguardd v2 --check): see the comments.

Risk: two-way door. T8122 speaker sense-slot setup only; bop-config, amp-dcblocker-config and speaker-config are unchanged, so no level or limit loosens.

Not yet: a no-regression boot on another SN012776 family (expect no refusal line and unchanged apple,amp-tx-zd-config).

Revert: git revert -m 1 <merge commit>

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for tracking down the silent J613 speakers. The check at src/kboot_audio.c:200 selects on the SoC compatible, but the cause you describe is a property of the data: the ADT row is the complement of the card's idle masks, so as "slots to zero" it covers another amp's sense slots. Could the check test that directly on every Mac, for example refuse an amp-tx-zd-config row that would zero slots the card assigns to another amp's IV sense, logging why? That protects speaker sensing everywhere instead of only on T8122. If the rows truly equal the card masks on all other Macs, it may also be simpler to stop passing the row whenever the card carries idle masks. A pasted before/after log or SDOUT register readout from the J613 would help.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This is the data-driven shape Ryan asked for. The row goes on only where the card's idle mask agrees with it. An amp whose row contradicts the mask goes back to the card's own mask, which is how it was set up before aura passed the rows on.

I checked speaker protection hardest. The change only affects which SDOUT slots an amp drives zeros on when idle. It doesn't touch the gain, level or limit rows (bop-config, amp-dcblocker-config and speaker-config go through as before), so no limit loosens, and nothing becomes audible without the speaker daemon. Where the check fires, the amp goes back to the long-standing card-mask behaviour, and aura logs it (src/kboot_audio.c:204). So any Mac other than the J613 that prints the "contradict" line is one to look at.

Two things before it merges:

  1. format-check fails on your own lines. At src/kboot_audio.c:123-124, the comment above dt_card_idle_mask() runs past 100 columns. clang-format -i src/kboot_audio.c fixes it.
  2. DCO. 436058c has Assisted-by and Co-Authored-By lines but no Signed-off-by, which docs/licensing.md asks for. Your earlier version had one.

Once both are in and CI is green, I'll merge. These rows come after the merge, with a revert ready:

  • a J613 boot of this version: both woofers log the "contradict" line, SDOUT_HIZ reads back as on 7.2, and speakersafetyd keeps running;
  • a no-regression boot on the other SN012776 Macs that we and Ryan have: no "contradict" line in the aura log, and the speaker daemon starts as before.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No code blockers. Dj's two merge items are still open on 436058c, which is unchanged since his review.

Earlier points:

  • SoC-compatible check (our 11-19 comment): resolved in code. The row is now kept back only where the card's idle mask for that amp contradicts it (src/kboot_audio.c:186-208), on every Mac, and the log says why. Only the idle-slot row changes: bop-config, amp-dcblocker-config and speaker-config still go through as before, so no level or limit becomes looser.
  • Before/after log or SDOUT readout from the J613 (ours): still open. The commit message says this version has not run on hardware.
  • format-check (Dj): still failing. src/kboot_audio.c:123 is 117 columns.
  • Signed-off-by (Dj): still missing from 436058c.

Findings:

  1. The PR title and description still describe the old T8122-only version ("don't pass amp-tx-zd-config on to T8122 boards", "except on T8122"). Please update both to the data-driven rule in the commit message, so the merge commit doesn't record a SoC gate that no longer exists.
  2. src/kboot_audio.c:139 dt_card_idle_mask() matches only nodes named exactly codec. A card that names its codec subnodes codec@0, codec@1 (allowed by the binding) is never matched, so its rows go on unchecked, which is today's behaviour. Matching the name up to @ (or using strncmp(name, "codec", 5) with name[5] either NUL or @) closes that gap. Not needed for the J613 tree.
  3. Evidence: the J613 row should be shown with this exact version, and with the speaker daemon we ship rather than speakersafetyd. Pass if both woofers print the contradict line, SDOUT_HIZ reads back as the card mask, the IV sense is valid with no protection trip, and the speakers play.

Hardware rows we can run:

  • J615 (M3 Air 15-inch, T8122): this head as Stage 2. Pass if the aura log has the contradict line for each amp whose row disagrees with the card mask, the SN012776 SDOUT_HIZ registers read back as the card's mask, and speakerguardd reports valid IV sense for every channel at low-level playback.
  • M1 Pro and M2 (no-regression): pass if there is no contradict line, the apple,amp-tx-zd-config properties in /sys/firmware/devicetree match the previous boot, and speakerguardd starts as before.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

format-check still fails with this branch merged onto current main: only the doc comment above dt_card_idle_mask() in src/kboot_audio.c (line 123 is over 100 columns). clang-format 20.1.8 wants it reflowed like this:

 * mode "zero", of each dai-link whose codec list names the amp as its n-th codec. 1 with *mask set
 * when the card has one, 0 when it has none or its codec list is not one phandle per amp, -1 when
 * two dai-links give the amp different masks.

Nothing else in the tree trips the check.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Blockers: 1.

The open items from the earlier reviews (format-check at src/kboot_audio.c:123, the missing Signed-off-by on 436058c, the T8122 title and description) still stand on this head; not repeated here.

  1. src/kboot_audio.c:186-208 plus setup_amp_group() (zd_ok): the check only runs for an amp that has a card idle mask. On the J613 the card has masks for codec 0 and codec 2 only (t8122-j613.dts:400-403, the two woofers). The two tweeters (codec 1 and 3) have no dai-tdm-idle-mode-<n>, so dt_card_idle_mask() returns 0 and their ADT rows go to the kernel unchecked. tas2764.c:1259-1269 then forces those slots to zero at probe. The hardware-tested version dropped every T8122 row, tweeters included. This one hands the tweeter rows on for the first time, and if they have the same complement shape as the woofer rows, they cover the woofer IV-sense slots (imon/vmon 0/2 and 4/6, t8122-j613.dts:353-378). That is the original failure, now coming from a different amp. The same applies to J615 codecs 1, 2, 4 and 5 (t8122-j615.dts:129-132 only masks 0 and 3).
    Fix: every SN012776 node carries ti,imon-slot-no/ti,vmon-slot-no. Refuse a row (mask or no mask) that would zero a slot another amp in the group uses for its imon or vmon. That check needs no card mask, works on every Mac, and covers what the mask comparison is meant to protect.

Checked and fine: the n-th codec index matches macaudio's sys_codec (macaudio.c:2533, i + be_index * ncodecs_per_cpu, i.e. the global codec position), so dai-tdm-slot-tx-idle-mask-<k> is looked up for the right amp; the decision happens before any row is written; a removed row is deleted from the DT node, not left stale.

HW row: J613 and J615 on this head as Stage 2, with the speaker daemon that ships: the aura log prints every amp's row and decision. SDOUT_HIZ_1..4 on all amps read back without a zero bit on any other amp's imon/vmon slot. IV sense is valid on every channel at low-level playback and protection does not trip. Plus one no-regression boot on an M1 Pro or M2: no contradict line, apple,amp-tx-zd-config unchanged from the previous boot.

Assisted-by: LLM (Claude:Opus 5.5)

…s agree

On the 13" M3 Air (J613) the speakers stay silent and speakersafetyd
stops with "Left Tweeter: Negative power, bad ivsense data?".

The cause is the amp-tx-zd-config row aura passes on. The SN012776
driver takes the row as the amp's SDOUT slots to drive zeros on when idle
(its first four bytes, slot 0 in bit 0), in place of the sound card's
idle mask for that amp. On the J613 each woofer's row is the complement
of the card mask its speakers worked with on 7.2:
 - left woofer: row f0 f0 f0 ff, mask 0x0f0f;
 - right woofer: row 0f 0f 0f ff, mask 0xf0f0.
With the rows, SDOUT_HIZ_1..4 read back f0 f0 f0 ff and 0f 0f 0f ff, and
speakersafetyd reports bad IV sense and stops.

Decide by the data instead of by the SoC. For each amp, look up the
card's idle mask: dai-tdm-slot-tx-idle-mask-<n>, in idle mode "zero", of
each dai-link that lists the amp as its n-th codec, which is the mask
macaudio applies. Where the card has one and the row's slots contradict
it on the bytes up to the mask's highest slot, the row is not passed on,
the log says why, and the card's mask stays in charge. The amp is then
set up as before aura passed the rows on. The row also stays back when
two dai-links give the amp different masks. Where the card has no mask
for the amp, or its codec list is not one phandle per amp, the row goes
on as before.

Why compare, rather than drop the row whenever the card has a mask: on
the Pros whose masks span three bytes, the rows (f0 f0 f0 ff as on the
J414c) also zero slots 24-31, and dropping them there would change those
Macs. Their
trees describe their masks as the ADT rows; where that holds, nothing
changes. Where a row contradicts a mask, that amp goes back to its
card's mask.

tests/run-kboot-audio.sh gains these scenarios:
 - card masks that agree, including on a T8122 tree;
 - a contradicting mask, on a T8122 tree and on another;
 - two dai-links that disagree;
 - a mask without the zero idle mode;
 - a codec list with a non-phandle entry;
 - short rows beside a mask;
 - the J613's real woofer rows and masks.
All 36 scenarios pass. Restoring the T8122 check, dropping the check,
comparing whole words, ignoring the idle mode, or dropping either of the
consistency rules each fails a scenario.

On the J613 with a 7.3 kernel and the row dropped (the earlier T8122
version): SDOUT_HIZ as on 7.2, speakersafetyd running, speakers audible.
This version has not run on hardware.

Signed-off-by: Scott Jones <scottajones@gmail.com>
@scottjones
scottjones force-pushed the upstream/t8122-amp-tx-zd branch from 436058c to 318e4e7 Compare November 24, 2026 14:43
@github-actions github-actions Bot added blast:m3 Macs affected, from Merge risk (bot) changes-requested A reviewer requested changes (bot) door:two-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks required sections (bot) labels Nov 24, 2026
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Merge readiness at 002d618b: not ready yet

Check Detail
CI at head ok 17 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes no requested by DjDeveloperr
Hardware row at head ok comment at 002d618b
Conflicts no merge conflicts with main: merge it in (no force push)
PR text ok Risk: two-way · . T8122 speaker sense-slot setup only; bop-config, amp-dcblocker-config and speaker-config are unchanged, so no level or limit loosens.

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at 318e4e74

Blockers:

  • Merge conflicts (mergeable: CONFLICTING): Branch is still based on c8799171 and conflicts with main (afc58ff9, specifically 9d900c6068e6 in src/kboot_audio.c, tests/kboot_audio_adt.py, and tests/run-kboot-audio.sh). Because of the conflict, none of the pull_request CI workflows (build, test, format-check, aurora-agent-policy, pr-text) have run on 318e4e74. Merge main in so mergeable == MERGEABLE and CI runs on the new head.
  • src/kboot_audio.c:123 (format-check): 318e4e74 carries the exact same tree as 436058c5; line 123 in the doc comment above dt_card_idle_mask() is 117 columns (ColumnLimit: 100 in .clang-format). Reflow with clang-format -i src/kboot_audio.c.
  • src/kboot_audio.c:199-200, 288-295 (unmasked amps in a contradicting group, §3 safety): tx_zd_row_ok() returns true unconditionally when dt_card_idle_mask() returns 0. On t8122-j613.dts (codecs 1 & 3), t8122-j615.dts (codecs 1, 2, 4, 5), and t8122-j504.dts (codecs 1, 2, 4, 5), only the two primary woofers carry dai-tdm-idle-mode-<n> / dai-tdm-slot-tx-idle-mask-<n>. Any unmasked tweeter or secondary woofer now receives its ADT amp-tx-zd-config row unchecked (the previously hardware-tested T8122 patch dropped rows for all amps in the group), which tas2764 programs into SDOUT_HIZ_1..4 with FORCE_0_EN if non-zero. If any amp in the group contradicts its card idle mask (or has conflicting dai-link masks), drop amp-tx-zd-config for the whole group (or refuse non-zero rows on unmasked amps in that group) and cover the full 4-amp J613 layout in tests/kboot_audio_adt.py.
  • PR body (§4 attribution): Remove the tool-attribution footer line at the end of the PR description. (Commit 318e4e74 itself is now clean and carries a human Signed-off-by:.)
  • PR title/body & hardware evidence (§5): Update the PR title and body from the obsolete T8122-only description to the data-driven card-idle-mask rule using the required What: / Tested: / Risk: / Not yet: lines, and add exact-head hardware rows: (1) J613 (and/or J615) running this head with speakerguardd (aura contradict log, SDOUT_HIZ readback, valid IV sense, audio playback, plus regression counts: 0 SELinux denials, 0 failed units, 0 new kernel errors), and (2) a no-regression boot on another SN012776 Mac (e.g. M1 Pro / M2 / M4) confirming no contradict line and unchanged apple,amp-tx-zd-config.

Checked: Full diff (src/kboot_audio.c, tests/kboot_audio_adt.py, tests/run-kboot-audio.sh) against main (afc58ff9) and Linux tas2764.c/macaudio.c/Apple DTS files across M1–M5, commit hygiene, formatting, CI check runs, and §1–§6 pre-PR checklist.

Evidence
  • §1 No model gating: Pass in code — dt_card_idle_mask() / tx_zd_row_ok() inspects the DT sound-card dai-tdm-idle-mode-<n> ("zero") and dai-tdm-slot-tx-idle-mask-<n> rather than SoC/board compatibles. PR title and body still describe the removed T8122 gate and must be updated.
  • §2 Production-ready, no hacks: Pass in principle (no cmdline/module params or timing hacks), blocked on merge conflicts with main (9d900c6068e6) and src/kboot_audio.c:123 (117 columns vs 100-column limit).
  • §3 Safety: bop-config, amp-dcblocker-config, and speaker-config are untouched, and stale apple,amp-tx-zd-config properties are deleted when rejected. However, unmasked amps (dt_card_idle_mask() == 0) still pass tx_zd_row_ok() unconditionally even when masked amps in the same group contradict the card (t8122-j613.dts, t8122-j615.dts, t8122-j504.dts only define idle masks on the two primary woofers). Note for the fix: dropping amp-tx-zd-config for the whole group whenever any amp in the group contradicts its card mask avoids breaking two-bus Macs (M1 Pro, M2 Air, M3 Pro, M4, M5) where a left woofer's valid row (0xf0f0 / 0xfff0f0f0) intentionally sets bits matching right-bus amps' ti,imon-slot-no/ti,vmon-slot-no on the opposite SDOUT bus.
  • §4 IP & attribution: Commit 318e4e74 is clean (Signed-off-by: Scott Jones <scottajones@gmail.com>, previous attribution trailers removed). PR description still ends with an AI-tool generation footer and must be cleaned.
  • §5 Evidence & PR structure: Commit message states "This version has not run on hardware." No exact-head HW row or no-regression row exists at 318e4e74; PR body lacks What: / Tested: / Risk: / Not yet: lines.
  • §6 Naming: Pass (no prohibited driver or legacy loader names in the diff or commit).
  • CI at 318e4e74: Only readiness / readiness (pull_request_target) ran; build, test, format-check, aurora-agent-policy, pr-text, esp-stage2-size, and stage1-size have not run due to merge conflicts.
  • Non-blocking notes:
    • src/kboot_audio.c:140: strcmp(name, "codec") ignores unit-addressed codec@N subnodes (all current Apple DTS files use codec, so not blocking, though matching "codec" up to NUL or '@' matches the binding).
    • src/kboot_audio.c:28: Comment references speakersafetyd; prefer speakerguardd per §3.

@DjDeveloperr

DjDeveloperr commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Still open:

  • Merge main in, which it conflicts with, so CI can run.
  • Reflow the comment at src/kboot_audio.c:123 with clang-format.
  • The speaker point: an unmasked amp still passes tx_zd_row_ok() when masked amps in its group contradict the card, so drop amp-tx-zd-config for the whole group in that case.
  • One boot at the new head on a J613 or J615 with the speakers quiet at start and gated by speakerguardd.

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 26, 2026
Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
…ntradicts the card

The card-mask check kept back only the row that contradicts its amp's card idle mask. An amp
the card has no mask for, such as a tweeter on the 13" M3 Air (J613: masks for codecs 0 and 2
only) or the 15" (J615: codecs 0 and 3 only), still got its ADT row, which the SN012776 driver
programs as SDOUT slots to force to zero. If that row has the same complement shape as the
woofer rows, it zeroes the woofers' IV sense slots: the original failure, from another amp.

The rows of one group are one layout. When the card contradicts any of them (or two dai-links
give an amp different masks), pass none of the group's rows on, so the card's masks apply to
the whole group, as before the rows were passed on and as in the version tested on the J613.
Groups whose masked amps agree keep every row, as on main.

Also match a codec subnode named codec@<n>, which the binding allows, and reflow the comment
above dt_card_idle_mask() to the 100-column limit.

tests: the J613's four-amp layout (unmasked tweeters with complement rows lose theirs too), a
codec@0 card, and the whole-group result for the existing contradiction cases. 49 scenarios
pass; card-codec-unit-address fails with the old name check.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 29, 2026 01:46
@RyanTheTide

Copy link
Copy Markdown
Contributor

@scottjones I've pushed two commits to your branch (normal push, no rebase), since the branch had been quiet since 11-24:

  1. ce4041c4 merges main. The only conflict was the SCENARIOS list in tests/kboot_audio_adt.py, where main added the HPD scenarios. Both lists are kept.
  2. 002d618b fixes the open review points:
    • Speaker point (Dj, Ryan): if any amp's row contradicts its card idle mask, or two dai-links disagree on an amp's mask, the group now passes none of its amp-tx-zd-config rows. Unmasked amps such as the J613/J615 tweeters can no longer hand the kernel a complement-shaped row that zeroes the woofers' IV-sense slots. On T8122 this gives the same result as the version you tested on the J613: no rows, and the card masks apply. Groups whose masked amps agree keep every row, as on main. aura logs amp-tx-zd-config not passed on for any of its N amps.
    • format-check: the comment above dt_card_idle_mask() is reflowed, and clang-format --dry-run --Werror passes.
    • codec@<n> (Ryan's point 2): the card walk now matches a codec@<n> subnode.
    • Tests: I added the J613 four-amp layout, where the unmasked tweeters with complement rows lose their rows too, and a codec@0 card. The existing contradiction cases now expect the whole-group result. 49/49 scenarios pass, and the codec@0 case fails with the old name check.

Next: a silent J615 row at this code, built on main plus #551 because main's Stage 2 doesn't link until #551 lands. It will record the aura kboot: audio lines, the apple,amp-tx-zd-config properties, SDOUT_HIZ readback and speakerguardd v2 --check. I'll also update the title and body to describe the data-driven rule.

@RyanTheTide RyanTheTide changed the title kboot_audio: don't pass amp-tx-zd-config on to T8122 boards kboot_audio: pass amp-tx-zd-config on only where the card's idle masks agree Nov 29, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at 002d618b — code, formatting, conflict resolution, and commit sign-offs are clean; awaiting fork CI workflow approval/green checks and the exact-head J613 or J615 hardware boot row.

Blockers:

  1. Exact-head hardware verification at 002d618b on a J613 or J615 (clean boot with speakers quiet at start and gated by speakerguardd, confirming amp-tx-zd-config is dropped for the whole group including unmasked tweeters), plus fork CI workflow approval and green checks.

Checked: Full 3-file diff (src/kboot_audio.c, tests/kboot_audio_adt.py, tests/run-kboot-audio.sh), dt_card_idle_mask(), tx_zd_row_ok(), whole-group zd_ok gating in setup_amp_group(), codec@<n> matching, bare #sound-dai-cells == 0 validation, formatting (<= 100 cols), and Signed-off-by lines across all 3 commits.

Evidence
  • All prior code/process blockers resolved (ce4041c4, 002d618b):
    • Cleanly merged main (MERGEABLE), reflowed dt_card_idle_mask() comment to 100 columns, and all 3 commits carry valid human Signed-off-by lines.
    • setup_amp_group() (src/kboot_audio.c:286-325) now validates every amp's amp-tx-zd-config row against its sound-card TDM idle mask before writing any property; if any amp in the group contradicts its card mask (or has conflicting masks across dai-links), zd_ok becomes false and dt_amp_setprop(..., NULL, ...) strips apple,amp-tx-zd-config (including stale DT copies) from every amp in the group — including unmasked tweeters.
    • dt_card_idle_mask() matches both codec and codec@<n>, verifies every sound-dai phandle has #sound-dai-cells == 0, requires dai-tdm-idle-mode-<n> = "zero", and returns -1 if two dai-links disagree.
    • Protection rows (bop-config, amp-dcblocker-config, speaker-config) are untouched.
    • Test coverage expanded with 11 scenarios including j613-four-amps and card-codec-unit-address (49 scenarios reported passing).
  • Non-blocking nit: The PR title and description still describe the old SoC-gated T8122 approach rather than the current data-driven sound-card idle-mask check.
  • Remaining merge gate: Once fork CI passes and the exact-head J613/J615 hardware boot row lands at 002d618b, this is ready to approve and merge.

@RyanTheTide

Copy link
Copy Markdown
Contributor

J615 row at 002d618b: FAIL, held. Don't merge. It ran silently with no playback. The build was main 3f1f73cb + #551 + this head as Stage 2 1.0.0b17-g6acd8960, as a one-shot aura-try on the configured tail.

production Stage 2 (ADT rows passed on) this PR
apple,amp-tx-zd-config woofer 1 L f0f0f0ff…, woofer 1 R 0f0f0fff…, tweeters and woofer 2 all zero absent on all six amps (aura refused the group)
SDOUT_HIZ_1..4 (L / R woofer 1) f0 f0 f0 ff / 0f 0f 0f ff 0f 0f 0f 00 / f0 f0 f0 00 (the card masks 0x0f0f0f / 0xf0f0f0)
speakerguardd v2 self-check passed, "V/I sense initialized: 12 switches", protection ready FAILED: "with every sense switch on, sense channels [0..11] are not live". v2 does not start and the speakers stay at the kernel floor

So on the J615 the ADT rows keep the IV sense alive, and the card's idle masks kill it. That is the opposite of the J613 report. Both Macs have the same row shape (f0f0f0ff / 0f0f0fff) and complement masks in their device trees. The failure is fail-closed (no sense, no grant, silent), so nothing was at risk, but this PR would take the J615's speakers away. I'm holding it and routing it as a protection change. The likely fix is the opposite one: the T8122 device trees' dai-tdm-slot-tx-idle-mask-* look inverted. The J613 should be re-checked on current main and kernel, where the ADT rows are already passed on, with speakerguardd v2 instead of speakersafetyd.

The Mac is restored to its configured Stage 2: self-check passed, protection ready, Enforcing, 0 failed units. Evidence is in our lab's traces/audio/20261129-closeout-291-j615, with rows-base, rows-cand and rows-after.

@github-actions github-actions Bot added ci-failing A check failed at the PR head (bot) and removed merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks required sections (bot) labels Nov 29, 2026
@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 29, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 002d618b797a

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: Full 3-file diff (src/kboot_audio.c, tests/kboot_audio_adt.py, tests/run-kboot-audio.sh), dt_card_idle_mask(), tx_zd_row_ok(), whole-group zd_ok gating in setup_amp_group(), codec@<n> matching, bare #sound-dai-cells == 0 validation, formatting (<= 100 cols), and Signed-off-by lines across all 3 commits.

Follow-ups (not blocking): fork CI green; exact-head J613/J615 boot row; update stale title/description

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing is open at 002d618b797a: the J615 row at this head fails. With the rows dropped, all 12 sense channels are dead and speakerguardd v2 does not start, so that Mac loses its speakers. With the rows passed on, as on main, its self-check passes. The J613 has the same row and mask shape, so the card masks in the T8122 device trees look like the wrong side: t8122-j613.dts and t8122-j615.dts still have 0x0f0f/0xf0f0 and 0x0f0f0f/0xf0f0f0, the complement of the ADT rows.

What decides it is a J613 on the current Stage 2 and kernel with speakerguardd v2 (speakerguardd --check, no playback needed):

  • If its self-check passes, nothing has to change in aura and this PR can be closed. The masks in the two device trees are then a linux fix.
  • If it fails there, please post the SDOUT_HIZ readback and the aura audio lines, because then the J613 and J615 differ in something other than these two values, and the rule has to use that.

My earlier points (the whole-group rule, formatting, sign-off, description) are answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blast:m3 Macs affected, from Merge risk (bot) changes-requested A reviewer requested changes (bot) door:two-way Revertible or not, from Merge risk (bot) merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants